﻿/*
=======================================================
    CheckWireropeDetail【在用绳检测详情】
=======================================================
*/

using Entities;

namespace Services
{
    public interface ICheckWireropeDetailRepository : IRepository<CheckWireropeDetail>
    {
        List<CheckWireropeDetail> GetListByCheckWireropeID(params int[] checkWireropeIDs);
    }


    public class CheckWireropeDetailRepository : BaseRepository<CheckWireropeDetail>, ICheckWireropeDetailRepository
    {
        public CheckWireropeDetailRepository(ISqlSugarClient dB, ICurrentUser currentUser, IQuery<CheckWireropeDetail> query)
            : base(dB, currentUser, query)
        {
        }

        #region 获取一个或多个检测记录的详情，即几根绳子的信息
        public List<CheckWireropeDetail> GetListByCheckWireropeID(params int[] checkWireropeIDs)
        {
            return _query.GetQueryable().Where(x => checkWireropeIDs.Contains(x.CheckWireropeID)).ToList();
        }
        #endregion
    }
}
